MDEV-34195 tests: avoid LP64 MYSQL size assert on x32
authorAquila Macedo <aquilamacedo@riseup.net>
Mon, 20 Apr 2026 14:40:01 +0000 (11:40 -0300)
committerOtto Kekäläinen <otto@debian.org>
Tue, 2 Jun 2026 00:02:02 +0000 (00:02 +0000)
x32 defines __x86_64__ but uses the ILP32 ABI, so the LP64
sizeof(MYSQL) == 1272 compile-time assert is selected incorrectly
and breaks the build.

Guard the x86_64 check with !defined(__ILP32__) so the LP64 size assert
only applies to real amd64 LP64 builds, while leaving the existing
Windows amd64 and i386 checks unchanged.

(cherry-picked from 936f04c4f9bd5d66014942bd27e1996b2e740626)

Merged on 10.11, and will be included in next release (10.11.19+, 11.8.9+).

Forwarded: https://github.com/MariaDB/server/pull/4962

Gbp-Pq: Name MDEV-34195-tests-avoid-LP64-MYSQL-size-assert-on-x32.patch

tests/mysql_client_fw.c

index 1c71ac8844b54989f76312e38f1483bb7451ddf9..e192287d51d555479ca49869e745042a2257bcfc 100644 (file)
@@ -1444,7 +1444,7 @@ int main(int argc, char **argv)
 */
 #if defined _M_AMD64
   compile_time_assert(sizeof(MYSQL) == 1208);
-#elif defined __x86_64__
+#elif defined(__x86_64__) && !defined(__ILP32__)
   compile_time_assert(sizeof(MYSQL) == 1272);
 #elif defined __i386__
   compile_time_assert(sizeof(MYSQL) == 964);